﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Folder.cs" company="Elilink">
//   Defor
// </copyright>
// <summary>
//   The folder with book.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace STDULibrary.Objects
{
    using System.Collections.Generic;

    /// <summary>
    ///     The folder with book.
    /// </summary>
    internal class Folder
    {
        #region Constructors and Destructors

        /// <summary>
        ///     Initializes a new instance of the <see cref="Folder" /> class.
        /// </summary>
        internal Folder()
        {
            this.SubFolders = new List<Folder>();
            this.Books = new List<Book>();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Folder"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        internal Folder(string path)
            : this()
        {
            this.FolderPath = path;
            this.FolderName = path.Substring(path.LastIndexOf('\\') + 1);
        }

        #endregion

        #region Properties

        /// <summary>
        ///     Gets or sets the books.
        /// </summary>
        internal List<Book> Books { get; set; }

        /// <summary>
        /// Gets or sets the folder name.
        /// </summary>
        internal string FolderName { get; set; }

        /// <summary>
        /// Gets or sets the folder path.
        /// </summary>
        internal string FolderPath { get; set; }

        /// <summary>
        ///     Gets or sets the sub folders.
        /// </summary>
        internal List<Folder> SubFolders { get; set; }

        #endregion
    }
}